<template lang="">
    <div>
        <van-field label='商品名称' v-model='form.goods_name'/>
        <van-field label='商品价格' v-model='form.price'/>
        <van-field label='商品数量' v-model='form.count'/>
        选择订单
        <select v-model='form.order_id'>
            <option :value="i.id" v-for='i in list'>{{i.name}}</option>
        </select>
    </div>
</template>
<script>
export default {
    data(){
        return{
            form:{},
            list:[]
        }
    },
    methods: {
        getlist(){
            this.axios.get('orderM').then(res=>{
                this.list = res.data.list
                this.form.order_id = this.list[0]['id']
            })
        }
    },
    mounted() {
        this.getlist()
    },
}
</script>
<style lang="">
    
</style>